{extend name="apps/common/view/front.tpl" /}
<!-- -->
{block name="header_meta"}
<title>呆错支付演示-{:config('common.site_name')}</title>
<meta name="keywords" content="呆错支付插件,呆错支付系统演示" />
<meta name="description" content="呆错支付是一款集成支付宝与微信支付的聚合支付系统、同时可自行扩展接入第四方免签平台。"  />
{/block}
{block name="main"}
<div class="container pt-3">
  <h2 class="text-center mb-3">呆错支付演示</h2>
  <h6 class="text-center mb-3">{volist name=":config('common.site_applys')" id="apply"}
  <a class="text-muted small mx-1" href="{:DcUrl($apply['module'].'/index/index','','')}">{$apply.name|DcHtml|DcSubstr=0,20,false}</a>{/volist}
  </h6>
  <div class="card mb-3">
    <h6 class="card-header">使用呆错支付实现打赏功能</h6>
    <div class="card-body">
      <form action="{:DcUrl('pay/index/save')}" method="post">
        <div class="form-group">
          <label for="score_rmb"><strong>打赏金额</strong></label>
          <input class="form-control form-control-sm" name="score_rmb" id="score_rmb" type="text" value="1" required autocomplete="off">
        </div>
        <div class="form-text">
          <label for="score_type"><strong>支付方式</strong></label>
        </div>
        {foreach name=":payPlatForms()" id="platForm"}
        <div class="custom-control custom-radio mb-3">
          <input class="custom-control-input" name="score_type" id="score_type_{$key}" type="radio" value="{$platForm}" {if $key eq 0}checked{/if}>
          <label class="custom-control-label" for="score_type_{$key}">{:lang('pay_'.$platForm)}</label>
        </div>
        {/foreach}
        <div class="form-group">
          <button class="btn btn-purple" type="submit">我要打赏</button>
        </div>
      </form>
    </div>
  </div>
  <div class="card mb-3">
    <div class="card-header">数据库字段</div>
    <pre class="card-body pb-0">{:dump( payFields() )}</pre> 
  </div>
</div>
{/block}